package resources;

import java.util.ArrayList;
import java.util.List;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

@Path("/author")
public class Author
{	
	@GET
	@Produces(MediaType.TEXT_XML)
	public List<model.Author> getDataBrowser() 
	{
		List<model.Author> authors = new ArrayList<model.Author>();
		authors.add(new model.Author("Kamil Buś"));
		authors.add(new model.Author("Daniel Kur"));
		authors.add(new model.Author("Artur Gertych"));
		authors.add(new model.Author("Piotr Broniszewski"));
		return authors; 
	}
	
	@GET
	@Produces(MediaType.APPLICATION_JSON)
	public List<model.Author> getDataBrowserJSON() 
	{
		return getDataBrowser(); 
	}
	
	@GET
	@Produces(MediaType.APPLICATION_XHTML_XML)
	public List<model.Author> getDataBrowserXHTML() 
	{
		return getDataBrowser(); 
	}
	
	@GET
	@Produces(MediaType.APPLICATION_XML)
	public List<model.Author> getDataBrowserXML() 
	{
		return getDataBrowser(); 
	}
}
